#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
#include<string.h>
#include<assert.h>
#include<stdbool.h>

char* mystrcat(char* destination, const char* source)
{
	char* init = destination;
	assert(destination && source);
	while (*destination != '\0')
		++destination;
	while (*destination++ = *source++);
	return init;
}

void f4()
{
	char a[30] = "abc\0xyz";
	char a2[30] = "abc\0xyz";
	char b[30] = { 'd','e','\0' };
	char* res = strcat(a, b);
	printf("%s\n", res);
	int i = 0;
	for (i = 0; i < 8; i++)
	{
		if (a[i] == '\0')
			printf("\\0");
		else
			printf("%c", a[i]);
	}
	res = mystrcat(a2, b);
	printf("\n%s\n", res);
	for (i = 0; i < 8; i++)
	{
		if (a2[i] == '\0')
			printf("\\0");
		else
			printf("%c", a2[i]);
	}
}

int main()
{
	return 0;
}

